home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
KBD_UTL
/
TPINKEY
/
INKEY.DOC
< prev
next >
Wrap
Text File
|
1995-01-19
|
3KB
|
63 lines
Inkey
by Peter Zicari, 1992 all rights reserved.
Posted to PCOHIO January 1995
WHAT IT IS
Inkey is a keyboard function for use with Borland Pascal
that recognizes key combinations that BP's readkey does not,
including all 12 function keys and alt-cursor combinations.
The function returns key code and sets two global variables,
Functn, which identifies the returned code as a non-letter
key, and Escape.
HOW TO USE IT
var
Functn,Escape: Boolean;
{$F+}
Function InKey : char; external;
{$L Inkey.obj}
The two must be declared either in the same unit or as a
global variable elsewhere, and the function must be declared
in a unit or used with {F+}
Inkey works by calling BIOS function 10H, which was included
to support the 101 key keyboard and was not available before
about 1985. Using this function in your program provides the
higher function keys and odd key combinations without need
to load ANSI with the /X parameter. It recognizes odd
values returned by some combinations and works around them.
Here is a partial list of the function key codes you can
use. In the shorthand below, S means shift, C means control
and A means alt.
F11 - 133 C-down - 145 A-down - 160
F12 - 134 C-insert- 146 A-PgDown 161
S-F11 - 135 C-delete- 147 A-Insert 162
S-F12 - 136 C-Tab - 148 A-Delete 163
C-F11 - 137 C-/ - 149 A-/ 164
C-F12 - 138 C-* - 150 A-Tab 165
A-F11 - 139 A-home - 151 A-enter 166
A-F12 - 140 A-up - 152
C-up arrow - 141 A-PgUp - 153
C-hyphen- 142 A-left - 155
C-5 - 143 A-right - 157
C-+ - 144 A-End - 159
DISCLAIMER
No fee is requested for use of this code, but I accept no
liability for problems that might arise from your use of it.
If you find it useful or find a bug and want to comment, you
can contact me at
peter.zicari@pcohio.com